package com.qipay.sp;

import com.qipay.baas.model.SpChannel;
import com.qipay.scalar.type.ChannelTypeEnum;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SpChannelService {
//    @Transactional
//    SpChannel next(ChannelTypeEnum channelTypeEnum);
    @Transactional
    SpChannel next(ChannelTypeEnum channelTypeEnum, Integer orderAmount);

    SpChannel next(ChannelTypeEnum channelTypeEnum, Integer orderAmount,List<Long>spIds);
    int insert(SpChannel sp);
    int update(SpChannel sp);
    int updateState(int id,byte state);
    int delete(int id);
    SpChannel get(int id);
    List<SpChannel> all();
    List<SpChannel> selectBySpId(int id);

    SpChannel getOneById(Integer id);

    SpChannel getOneBySpIdAndChannelType(Long spid, ChannelTypeEnum channelTypeEnum);

}
